import request from "@/router/axios";

export const getGoodsList = (page, size, params) => {
    return request({
        url: "/base/goodsManage/list",
        method: "post",
        params: {
            ...params,
            page,
            size
        }
    });
};

export const getList = (page, size, params) => {
    return request({
        url: "/base/homeGoods/list",
        method: "post",
        params: {
            ...params,
            page,
            size
        }
    });
};

export const addItem = (data) => {
    return request({
        url: "/base/homeGoods/addItem",
        method: "post",
        meta: {
            isSerialize: true
        },
        data:{
            ...data
        }
    });
};

export const editItem = (data) => {
    return request({
        url: "/base/homeGoods/editItem",
        method: "post",
        meta: {
            isSerialize: true
        },
        data:{
            ...data
        }
    });
};

export const remove = (data) => {
    return request({
        url: "/base/homeGoods/delete",
        method: "post",
        meta: {
            isSerialize: true
        },
        data:{
            id:data
        }
    });
};